package com.colabo.j2ee.web.oaf.orgnization;

import java.util.List;

import com.colabo.j2ee.web.core.exception.ServiceException;
import com.colabo.j2ee.web.oaf.orgnization.model.IPRoleVO;


public interface IRoleService {
	String BEAN_ID = "roleService";
	/**
	 * 根据id获得角色对象
	 * @param roleid
	 * @return
	 * @throws ServiceException
	 */
	public IPRoleVO getRoleByRoleId(String roleid) throws ServiceException;
	
	/**
	 * 获得所有角色对象
	 * @return List<IPRoleVO>
	 * @throws ServiceException
	 */
	public List getAllRoles() throws ServiceException;

	/**
	 * 取得默认角色, 若没有角色或所有角色isDefault属性为0, 则返回null 若存在多个角色isDefault属性为1, 则返回第一个role
	 * 
	 * @return
	 * @throws ServiceException
	 */
	public IPRoleVO getDefaultRole() throws ServiceException;
}